package org.dtrd.config.wechat.entity.bean.officialaccount;

import lombok.Data;

/**
 * 微信模板传参
 * 示例如下
 * {{first}}
 * 订单号：{{keyword1}}
 * 商品名称：{{keyword2}}
 * 订单类型：{{keyword3}}
 * 支付时间：{{keyword4}}
 * 负责人：{{keyword5}}
 * {{remark}}
 */
@Data
public class WechatTemplateParams {

    /**
     * 模板标题
     */
    private WechatTemplateValue first;

    private WechatTemplateValue keyword1;

    private WechatTemplateValue keyword2;

    private WechatTemplateValue keyword3;

    private WechatTemplateValue keyword4;

    private WechatTemplateValue keyword5;

    private WechatTemplateValue remark;

    private WechatTemplateParams() {
    }

    public static final class WechatTemplateParamsBuilder {
        private WechatTemplateParams wechatTemplateParams;

        private WechatTemplateParamsBuilder() {
            wechatTemplateParams = new WechatTemplateParams();
        }

        public static WechatTemplateParamsBuilder initTemplateParams() {
            return new WechatTemplateParamsBuilder();
        }

        public WechatTemplateParamsBuilder withFirst(String value) {
            wechatTemplateParams.setFirst(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withFirst(String value, String color) {
            wechatTemplateParams.setFirst(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword1(String value) {
            wechatTemplateParams.setKeyword1(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword1(String value, String color) {
            wechatTemplateParams.setKeyword1(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword2(String value) {
            wechatTemplateParams.setKeyword2(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword2(String value, String color) {
            wechatTemplateParams.setKeyword2(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword3(String value) {
            wechatTemplateParams.setKeyword3(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword3(String value, String color) {
            wechatTemplateParams.setKeyword3(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword4(String value) {
            wechatTemplateParams.setKeyword4(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword4(String value, String color) {
            wechatTemplateParams.setKeyword4(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword5(String value) {
            wechatTemplateParams.setKeyword5(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withKeyword5(String value, String color) {
            wechatTemplateParams.setKeyword5(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParamsBuilder withRemark(String value) {
            wechatTemplateParams.setRemark(new WechatTemplateValue(value));
            return this;
        }

        public WechatTemplateParamsBuilder withRemark(String value, String color) {
            wechatTemplateParams.setRemark(new WechatTemplateValue(value, color));
            return this;
        }

        public WechatTemplateParams build() {
            return wechatTemplateParams;
        }
    }
}
